﻿/*-----------------------------------------------
// File: DictWeaponBlo.cs
// Description: 
// Author: Shaobing	492057342@qq.com
-----------------------------------------------*/
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using Dict.Dao;
using Dict.DataModel;

namespace Dict.Blo
{
    public class DictWeaponBlo 
    {
        public static TableWeaponRes GetTableWeaponResByHeroIdAndEquipId(string heroId, string equipId) {
            var res = Dict.DictDataManager.Instance.tableWeaponResDao.GetByTwoIndex(heroId, equipId);
            if (res.Count > 0)
                return res[0];
            return null;
        }

        public static TableWeaponRes GetDefaultTableWeaponRes(string heroId) {
            var res = Dict.DictDataManager.Instance.tableWeaponResDao.GetByTwoIndex(heroId, "");
            if (res.Count > 0)
                return res[0];
            return null;
        }

        public static TableMonsterWeaponRes GetTableMonsterWeaponResByHeroId(string heroId) {
            return Dict.DictDataManager.Instance.tableMonsterWeaponResDao.GetById(heroId);
        }
    }
}